let defaultStatus={
    uid:localStorage['uid']?localStorage['uid']:'',
    useName:localStorage['useName']?localStorage['useName']:'',
    useEmail:localStorage['useEmail']?localStorage['useEmail']:'',
    useHeadImg:localStorage['useHeadImg']?localStorage['useHeadImg']:'',
    useRole:localStorage['useRole']?localStorage['useRole']:'',
}
function redGetUseInfo(state=defaultStatus, action ){
    switch (action.type){
        case 'getthirduseinfo':
            return {...state,...action.data};
        case 'getuserinfo':
            localStorage['uid']=action.data.uid;
            localStorage['useName']=action.data.useName;
            localStorage['useEmail']=action.data.useEmail;
            localStorage['useHeadImg']=action.data.useHeadImg;
            localStorage['useRole']=action.data.useRole;
            return {...state,...action.data}
        default:
            return state
    }
}
export default redGetUseInfo